Skip to content

Conversation

@christiemolloy
Copy link
Member

closes #2562

There may be a few solutions to this problem, I went with the solution of wrapping the image in its own container, because we don't know how the user will give it height/width. So even if width is added to the image in the html or the svg, it will still size proportionally down. But interested to hear what you guys think @mcoker @mattnolting

@patternfly-build
Copy link
Collaborator

PatternFly-Next preview: https://patternfly-next-pr-2578.surge.sh

Copy link
Collaborator

@mattnolting mattnolting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @mcoker wdyt?

@mcoker
Copy link
Contributor

mcoker commented Jan 20, 2020

@christiemolloy I dig it, I think this makes the most sense. Though I wonder if we should be more generic in the element name in case someone wants to put some text or text+icon instead. We could call it __main or something like that?

@christiemolloy
Copy link
Member Author

I agree with using a less specific name. Also added class to the docs @mcoker

<div class="pf-c-card__image{{#if card-image--modifier}} {{card-image--modifier}}{{/if}}"
{{#if card-image--attribute}}
{{{card-image--attribute}}}
<div class="pf-c-card__main{{#if card-main--modifier}} {{card-main--modifier}}{{/if}}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we call it __head-main instead, since it should only exist in __head? I think we should reserve __main in case we want to add that to the root of the card.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah +1

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work! 🥇

@mcoker mcoker merged commit 2f55a56 into patternfly:master Jan 20, 2020
@redallen
Copy link
Contributor

🎉 This PR is included in version 2.50.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants